package com.ctshk.rpc.order.custom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderDetailDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderListDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderPageDTO;
import com.ctshk.rpc.order.custom.entity.CustomizedOrder;
import com.ctshk.rpc.order.custom.provider.CustomOrderProvider;
import com.ctshk.rpc.order.custom.req.order.CustomOrderIdReq;
import com.ctshk.rpc.order.custom.req.order.CustomOrderListReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * <p>
 * 定制包团订单 Mapper 接口
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-02-22
 */
public interface CustomizedOrderMapper extends BaseMapper<CustomizedOrder> {

    @SelectProvider(type = CustomOrderProvider.class, method = "selectCountBySelective")
    CustomOrderListDTO selectCountBySelective(CustomOrderListReq req);

    @SelectProvider(type = CustomOrderProvider.class, method = "selectListBySelective")
    IPage<CustomOrderPageDTO> selectListBySelective(IPage<CustomOrderListReq> page, @Param("req")CustomOrderListReq req,@Param("permision") boolean permision,@Param("idList") List<Long> idList);

    @SelectProvider(type = CustomOrderProvider.class, method = "selectDetailBySelective")
    CustomOrderDetailDTO selectDetailBySelective(CustomOrderIdReq req);
}
